home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / PRUS101.ZIP / FNOBREAK.PAS < prev    next >
Pascal/Delphi Source File  |  1994-12-19  |  3KB  |  122 lines

  1.  
  2. UNIT FNOBREAK; { FIDO unit to avoid <Pause>, <ctrl-Break>, <ctrl-alt-Del>
  3.                  and <PrtScr> }
  4.  (***************************************************************************
  5.  
  6.         RELEASE 1.02ß - as first contained in the file PRUS101.LZH
  7.                  by Paul Schubert, 2:244/1181.18, GERMANY
  8.  
  9.                --------------------------------------------
  10.                 organized for Fido's PASCAL related echoes
  11.                --------------------------------------------
  12.  
  13.      06/21/1994 to --/--/---- by Paul Schubert, 2:244/1181.18, GERMANY
  14.  
  15.  
  16.            As far as third party copyrights are not violated this
  17.            source code is hereby placed to the public domain. Use
  18.            it whatever way you want, but use AT YOUR OWN RISK.
  19.  
  20.            In case you should modify the source rather send your
  21.            modifications to the unit's current organizer (see above for
  22.            NM address) than to spread it on your own. This will help to
  23.            keep the unit updated and grant a certain standard to all
  24.            other users as well.
  25.  
  26.            The unit is currently still under work. So it might greatly
  27.            benefit of your participation.
  28.  
  29.            Those who contributed to the following piece of source,
  30.            listed in alphabethical order:
  31.         ================================================================
  32.            Paul Schubert
  33.         ================================================================
  34.            YOUR NAME WILL APPEAR HERE IF YOU CONTRIBUTE USEFUL SOURCE.
  35.  
  36.            Credits in your own programs are as welcome as unnecessary.
  37.  
  38.  ***************************************************************************)
  39.  
  40. {$I FDEFINE.DEF} { Use the general include file for conditional defines and
  41.                    common compiler directives ... }
  42.  
  43.                  { ... and set the unit's specific defines aftwerwards. }
  44.  
  45. {$S-,R-,V-,I-,B-,F-,O-,A+}
  46.  
  47. INTERFACE
  48.  
  49. USES   DOS;
  50.  
  51. FUNCTION  BREAKPRESSED      : BOOLEAN;
  52. FUNCTION  PAUSEPRESSED      : BOOLEAN;
  53. FUNCTION  CTRLALTDELPRESSED : BOOLEAN;
  54. FUNCTION  PRTSCRPRESSED     : BOOLEAN;
  55.  
  56. PROCEDURE INITKBDVECTORS;
  57. PROCEDURE RESTOREKBDVECTORS;
  58. PROCEDURE PRINTSCREEN;
  59.  
  60. IMPLEMENTATION
  61.  
  62. CONST  PAUSEK    : BOOLEAN = FALSE;
  63.        BREAKK    : BOOLEAN = FALSE;
  64.        CTRBRK    : BOOLEAN = FALSE;
  65.        PRTSCK    : BOOLEAN = FALSE;
  66.  
  67. VAR    EXITSAVE  : POINTER;
  68.  
  69. {$L FNOBREAK}
  70.  
  71. PROCEDURE NEWINT09; EXTERNAL;
  72. PROCEDURE NEWINT05; EXTERNAL;
  73. {$F+} { DO NOT !!!! change the position of this compiler directive !!! }
  74. PROCEDURE PRINTSCREEN; EXTERNAL;
  75.  
  76. PROCEDURE INITKBDVECTORS;    EXTERNAL;
  77. PROCEDURE RESTOREKBDVECTORS; EXTERNAL;
  78.  
  79. PROCEDURE MYEXIT;
  80. BEGIN
  81.   RESTOREKBDVECTORS;
  82.   MEM[$40:$71] := 0; { BREAK- FLAG RÜCKSETZEN }
  83.   EXITPROC := EXITSAVE;
  84. END;
  85.  
  86.  
  87. FUNCTION  BREAKPRESSED : BOOLEAN;
  88. BEGIN
  89.   BREAKPRESSED := (MEM[$40:$71] <> 0) OR CTRBRK;
  90.   MEM[$40:$71] := 0;
  91.   CTRBRK := FALSE;
  92. END;
  93.  
  94.  
  95. FUNCTION  PAUSEPRESSED : BOOLEAN;
  96. BEGIN
  97.   PAUSEPRESSED := PAUSEK;
  98.   PAUSEK := FALSE;
  99. END;
  100.  
  101.  
  102. FUNCTION  CTRLALTDELPRESSED : BOOLEAN;
  103. BEGIN
  104.   CTRLALTDELPRESSED := BREAKK;
  105.   BREAKK := FALSE;
  106. END;
  107.  
  108.  
  109. FUNCTION  PRTSCRPRESSED : BOOLEAN;
  110. BEGIN
  111.   PRTSCRPRESSED := PRTSCK;
  112.   PRTSCK := FALSE;
  113. END;
  114.  
  115.  
  116. BEGIN { MAIN }
  117.   INITKBDVECTORS;
  118.   EXITSAVE := EXITPROC;
  119.   EXITPROC := @MYEXIT;
  120.   MEM[$40:$71] := 0;
  121. END.
  122.